package com.castle.fortress.admin.orders.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import com.castle.fortress.admin.goods.dto.GoodsDto;
import com.castle.fortress.admin.orders.entity.GoodsOrderItemEntity;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import java.util.Date;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
 * 订单表 实体类
 *
 * @author Mgg
 * @since 2023-01-13
 */
@Data
@ApiModel(value = "goodsOrder对象", description = "订单表")
public class GoodsOrderDto implements Serializable {
	private static final long serialVersionUID = 1L;
	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "主键ID")
	@JsonProperty("id")
	private Long id;
	@ApiModelProperty(value = "订单编号")
	@JsonProperty("orderNumber")
	private String orderNumber;
	@ApiModelProperty(value = "订单名称")
	@JsonProperty("prodName")
	private String prodName;
	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "订单用户id")
	@JsonProperty("memberId")
	private Long memberId;
	@ApiModelProperty(value = "订单金额(实际支付金额)")
	@JsonProperty("price")
	private BigDecimal price;
	@ApiModelProperty(value = "原订单金额(原价)")
	@JsonProperty("oldPrice")
	private BigDecimal oldPrice;
	@ApiModelProperty(value = "订单改价金额")
	@JsonProperty("changePrice")
	private BigDecimal changePrice;
	@ApiModelProperty(value = "订单状态(用户看的)") //OrderStatusEnum
	@JsonProperty("orderStatus")
	private Integer orderStatus;
	@ApiModelProperty(value = "订单流转状态(对内)") //OrderInsideStatusEnum
	@JsonProperty("orderInsideStatus")
	private Integer orderInsideStatus;
	@ApiModelProperty(value = "第三方流水号")
	@JsonProperty("serial")
	private String serial;
	@ApiModelProperty(value = "支付类型 1为余额支付 2在线支付 3 货到付款 11 后台付款 21 微信支付 22 支付宝支付 23 银联支付")
	@JsonProperty("payType")
	private Integer payType;
	@DateTimeFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@ApiModelProperty(value = "付款时间")
	@JsonProperty("payTime")
	private Date payTime;
	@ApiModelProperty(value = "下单渠道")
	@JsonProperty("channel")
	private String channel;
	@DateTimeFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@ApiModelProperty(value = "下单时间")
	@JsonProperty("createTime")
	private Date createTime;
	@ApiModelProperty(value = "备注")
	@JsonProperty("remark")
	private String remark;
	@ApiModelProperty(value = "优惠券金额(单位元)")
	@JsonProperty("couponAmount")
	private BigDecimal couponAmount;
	@ApiModelProperty(value = "配送类型")
	@JsonProperty("dvyType")
	private String dvyType;
	@ApiModelProperty(value = "配送方式id")
	@JsonProperty("dvyId")
	private String dvyId;
	@ApiModelProperty(value = "快递单号")
	@JsonProperty("expresssn")
	private String expresssn;
	@ApiModelProperty(value = "运费")
	@JsonProperty("dispatchPrice")
	private BigDecimal dispatchPrice;
	@DateTimeFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@ApiModelProperty(value = "发货时间")
	@JsonProperty("dvyTime")
	private Date dvyTime;
	@ApiModelProperty(value = "取消订单时间")
	@JsonProperty("cancelTime")
	private String cancelTime;
	@ApiModelProperty(value = "退款状态")
	@JsonProperty("refundState")
	private String refundState;
	@DateTimeFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@ApiModelProperty(value = "确认收货时间")
	@JsonProperty("confirmReceiptTime")
	private Date confirmReceiptTime;
	@DateTimeFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@ApiModelProperty(value = "订单完成时间")
	@JsonProperty("finishTime")
	private Date finishTime;
	@ApiModelProperty(value = "使用的优惠券名")
	@JsonProperty("couponName")
	private String couponName;
	@ApiModelProperty(value = "使用的优惠券ID")
	@JsonProperty("couponId")
	private Integer couponId;
	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "商家ID(当前默认自营 -1)")
	@JsonProperty("shopId")
	private Long shopId;
	@ApiModelProperty(value = "商家名称")
	@JsonProperty("shopName")
	private String shopName;
	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "创建者")
	@JsonProperty("createUser")
	private Long createUser;
	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "更新者")
	@JsonProperty("updateUser")
	private Long updateUser;
	@DateTimeFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@ApiModelProperty(value = "更新时间")
	@JsonProperty("updateTime")
	private Date updateTime;
	@ApiModelProperty(value = "状态")
	@JsonProperty("status")
	private Integer status;
	@ApiModelProperty(value = "删除状态 YesNoEnum。 yes删除；no未删除")
	@JsonProperty("isDeleted")
	private Integer isDeleted;
	@ApiModelProperty(value = "创建者姓名")
	@JsonProperty("createUserName")
	private String createUserName;

	@ApiModelProperty(value = "收货人姓名")
	@JsonProperty("consignee")
	private String consignee;
	@ApiModelProperty(value = "收货人手机号")
	@JsonProperty("phone")
	private String phone;
	@ApiModelProperty(value = "地区编码 省-市-区 编码拼接")
	@JsonProperty("regionCode")
	private String regionCode;
	@ApiModelProperty(value = "详细地址 省-市-区-详细地址拼接")
	@JsonProperty("address")
	private String address;


	@ApiModelProperty(value = "订单内商品信息")
	private List<GoodsOrderItemDto> goodsList;





	/**
	 * 开始时间(筛选用)
	 */
	@DateTimeFormat(
			pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
			pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@ApiModelProperty(value = "开始时间")
	@JsonProperty("startTime")
	private Date startTime;

	/**
	 * 结束时间(筛选用)
	 */
	@DateTimeFormat(
			pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
			pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@ApiModelProperty(value = "结束时间")
	@JsonProperty("endTime")
	private Date endTime;
}
